#include "ThreadPool.hpp"
#include "Task.hpp"


int main()
{
    std::cout << "ThreadPool test start!" << std::endl;
    srand((unsigned int)time(nullptr) ^ getpid());
    ThreadPool<Task>::GetThreadPool()->Start();
    while(true)
    {
        int data1 = rand() % 100;
        int data2 = rand() % 100;
        char op = opers[rand() % opers.size()];
        Task t(data1, data2, op);
        ThreadPool<Task>::GetThreadPool()->Push(t);
        std::cout << "main thread make task: " << t.GetTask() << std::endl;
        sleep(1);
    }
    return 0;
}